	//////////////////////////////////////////////////////////////////////////////////////
	*Note 1: The working datasets are available in the section Appendices of the thesis.*
	*Note 2: The names given to the output graphs do not always correspond to the name*
	*of the graphs in the thesis.*
	//////////////////////////////////////////////////////////////////////////////////////


	
	
* STATISTICAL ANALYSIS*
use "C:\Données\MASTER\THESIS\UPLOADED DATA\DATASET\LucasGVogler-ThesisMAES-RegressionDataset.dta"

**** A - Setting data as panel ****
encode country, gen(country1)
xtset country1 year
********

**** B - Setting distance CV ****
encode dist_eu, gen(dist_eu1)
********

** Graph color, same as GU logo **
color("1 84 149") //=> GU theme color 1
color("226 0 94") //=> GU theme color 2
****



///// C - PRE-REG: DESCRIPTIVE STATISTICS /////
	*-* The aim of this subset is to determine whether the variables are distributed in accordance to our model. The variables that are not might be transformed. *-*
	
	* C1 - Descriptive statistics*
	sum meu_cm
	sum xeu_cx
	sum s_coll
	sum s_ind
	sum c_col
	sum dist_eu1
	sum pre_s_m_share
	sum pre_s_x_share
	sum wbgi_pve
	sum wdi_unempilo
	sum wdi_gdpgr
	sum c_war
	*
	
	* C2 - Distribution histograms *
	histogram meu_cm, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA1_HG_MEU-CM_A5.png", as(png) name("Graph")
	histogram xeu_cx, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA2_HG_XEU-CX_A5.png", as(png) name("Graph")
	histogram s_coll, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA3_HG_S_COLL_A5.png", as(png) name("Graph")
	histogram s_ind, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA4_HG_S_IND_A5.png", as(png) name("Graph")
	histogram c_col, normal color("1 84 149") discrete barwidth(0.1)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA5_LHG_C_COL_A5.png", as(png) name("Graph")
	histogram dist_eu1, normal color("1 84 149") discrete barwidth(0.1) xlabel(1 "Americas" 2 "Neighborhood" 3 "Outer circle" 4 "World")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA6_HG_DIST_EU_A5.png", as(png) name("Graph")
	histogram pre_s_m_share, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA7_HG_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	histogram pre_s_x_share, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA8_HG_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	histogram wbgi_pve, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA9_HG_S_IND_A5.png", as(png) name("Graph")
	histogram wdi_unempilo, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA10_HG_WDI_UNEMPILO_A5.png", as(png) name("Graph")
	histogram wdi_gdpgr, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA11_HG_WDI_GDPGR_A5.png", as(png) name("Graph")
	histogram c_war, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA12_HG_C_WAR_A5.png", as(png) name("Graph")
	*

	* C3 - QQplots *
	qnorm meu_cm, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA13_QQ_MEU_CM_A5.png", as(png) name("Graph")
	qnorm xeu_cx, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA14_QQ_XEU_CX_A5.png", as(png) name("Graph")
	qnorm s_coll, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA15_QQ_S_COLL_A5.png", as(png) name("Graph")
	qnorm s_ind, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA16_QQ_S_IND_A5.png", as(png) name("Graph")
	qnorm c_col, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA17_QQ_C_COL_A5.png", as(png) name("Graph")
	qnorm dist_eu1, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA18_QQ_DIST_EU_A5.png", as(png) name("Graph")
	qnorm pre_s_m_share, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA19_QQ_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	qnorm pre_s_x_share, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA20_QQ_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	qnorm wbgi_pve, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA21_QQ_WBGI_PVE_A5.png", as(png) name("Graph")
	qnorm wdi_unempilo, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA22_QQ_WDI_UNEMPILO_A5.png", as(png) name("Graph")
	qnorm wdi_gdpgr, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA23_QQ_WDI_GDPGR_A5.png", as(png) name("Graph")
	qnorm c_war, color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA24_QQ_C_WAR_A5.png", as(png) name("Graph")
	*****

//////////
	
	
// D - Transformation trials and scatters //

	*** D1 - Log trials ***
		*-* I do not transforming the DVs for interpretations reasons *-*
	gen log_s_coll = log(s_coll)
	sum log_s_coll
	lnskew0 ln_s_coll = s_coll
	sum ln_s_coll
	bcskew0 bc_s_coll = s_coll
	sum bc_s_coll
	histogram ln_s_coll, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA3b_LHG_S_COLL_A5.png", as(png) name("Graph")
	*
	gen log_s_ind = log(s_ind)
	sum log_s_ind
	lnskew0 ln_s_ind = s_ind
	sum ln_s_ind
	bcskew0 bc_s_ind = s_ind
	sum bc_s_ind
	histogram ln_s_ind, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA4b_LHG_S_IND_A5.png", as(png) name("Graph")
	*
	sum c_col
	gen log_c_col = log(c_col)
	sum log_c_col
	lnskew0 ln_c_col = c_col
		*-* Displayed an error *-*
	bcskew0 bc_c_col = c_col
	sum bc_c_col
	*
	sum dist_eu1
	gen log_dist_eu1 = log(dist_eu1)
	sum log_dist_eu1
	lnskew0 ln_dist_eu1 = dist_eu1
	sum ln_dist_eu1
	bcskew0 bc_dist_eu1 = dist_eu1
	sum bc_dist_eu1
	histogram log_dist_eu1, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA6b_LHG_DIST_EU_A5.png", as(png) name("Graph")
	histogram ln_dist_eu1, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA6c_LHG_DIST_EU_A5.png", as(png) name("Graph")
	histogram bc_dist_eu1, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA6d_LHG_DIST_EU_A5.png", as(png) name("Graph")
	*
	sum pre_s_m_share
	gen log_pre_s_m_share = log(pre_s_m_share)
	sum log_pre_s_m_share
	lnskew0 ln_pre_s_m_share = pre_s_m_share
	sum ln_pre_s_m_share
	bcskew0 bc_pre_s_m_share = pre_s_m_share
	sum bc_pre_s_m_share
	histogram pre_s_m_share, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA25a_LHG_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	histogram log_pre_s_m_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA25b_LHG_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	histogram ln_pre_s_m_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA25c_LHG_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	histogram bc_pre_s_m_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA25d_LHG_PRE_S_M_SHARE_A5.png", as(png) name("Graph")
	*
	sum pre_s_x_share
	gen log_pre_s_x_share = log(pre_s_x_share)
	sum log_pre_s_x_share
	lnskew0 ln_pre_s_x_share = pre_s_x_share
	sum ln_pre_s_x_share
	bcskew0 bc_pre_s_x_share = pre_s_x_share
	sum bc_pre_s_x_share
	histogram pre_s_x_share, normal color("1 84 149")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA26a_LHG_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	histogram log_pre_s_x_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA26b_LHG_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	histogram ln_pre_s_x_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA26c_LHG_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	histogram bc_pre_s_x_share, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA26d_LHG_PRE_S_X_SHARE_A5.png", as(png) name("Graph")
	*
	gen log_wdi_unempilo = log(wdi_unempilo)
	sum log_wdi_unempilo
	lnskew0 ln_wdi_unempilo = wdi_unempilo
	sum ln_wdi_unempilo
	bcskew0 bc_wdi_unempilo = wdi_unempilo
	sum bc_wdi_unempilo
	histogram log_wdi_unempilo, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA10b_LHG_WDI_UNEMPILO_A5.png", as(png) name("Graph")
	histogram ln_wdi_unempilo, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA10c_LHG_WDI_UNEMPILO_A5.png", as(png) name("Graph")
	histogram bc_wdi_unempilo, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA10d_LHG_WDI_UNEMPILO_A5.png", as(png) name("Graph")
	*
	gen log_wdi_gdpgr = log(wdi_gdpgr)
	sum log_wdi_gdpgr
	lnskew0 ln_wdi_gdpgr = wdi_gdpgr
	sum ln_wdi_gdpgr
	bcskew0 bc_wdi_gdpgr = wdi_gdpgr
	sum bc_wdi_gdpgr
	histogram ln_wdi_gdpgr, normal color("226 0 94")
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Desc-Transformations\FigA11b_LHG_WDI_GDPGR_A5.png", as(png) name("Graph")
	*
	gen log_c_war = log(c_war)
	sum log_c_war
	lnskew0 ln_c_war = c_war
		*-* Displayed an error *-*
	bcskew0 bc_c_war = c_war
	sum bc_c_war
	*****

	** D2 - Scatter plots **
	graph twoway (scatter meu_cm s_coll) (lfit meu_cm s_coll)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Scatters\M S_coll.png", as(png) name("Graph")
	graph twoway (scatter meu_cm s_ind) (lfit meu_cm s_ind)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Scatters\M S_ind.png", as(png) name("Graph")
	graph twoway (scatter xeu_cx s_coll) (lfit xeu_cx s_coll)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Scatters\X S_coll.png", as(png) name("Graph")
	graph twoway (scatter xeu_cx s_ind) (lfit xeu_cx s_ind)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\1 - DESC STATS\Wave A5\Scatters\X S_ind.png", as(png) name("Graph")
	**

//////////


/// E - Panel graphs, not relevant for the thesis ///
xtset country1 year
xtline s_coll
xtline s_ind
xtline s_coll, overlay
xtline s_ind, overlay
//////


/////// F - PRE-REG TESTS ///////

	*** F1 - If < 0.05, use fixed effects ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	estimates store T_FT_FM6
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	estimates store T_FT_RM6
	hausman T_FT_FM6 T_FT_RM6, sigmamore
	**
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	estimates store T_FT_FX6
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	estimates store T_FT_RX6
	hausman T_FT_FX6 T_FT_RX6, sigmamore
	*****

	*** F2 - Test for the need of time-fixed effects; if < 0.05, time-fixed effects are needed. ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war i.year, fe robust
	testparm i.year
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war i.year, fe robust
	testparm i.year
	*****

	*** F3 - Test for the need for random effects; if < 0.05, random effects regression is needed. ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xttest0
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xttest0
	*****

//////////


/////// G - REGRESSION ANALYSES //////////

	*** G1 - PROGRESSIVE FULL MODEL, FIXED EFFECTS ***
	///// FIXED EFFECTS without robust standard errors, not considered in the thesis ////
	xtreg meu_cm s_coll s_ind, fe
	est store M_FM6_1
	xtreg meu_cm s_coll s_ind wbgi_pve, fe
	est store M_FM6_2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo, fe
	est store M_FM6_3
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, fe
	est store M_FM6_4
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	est store M_FM6_5
	esttab M_FM6_1 M_FM6_2 M_FM6_3 M_FM6_4 M_FM6_5
	esttab M_FM6_1 M_FM6_2 M_FM6_3 M_FM6_4 M_FM6_5 using T_FM6, rtf cells(b(star fmt(3)) se(par fmt(2))) stats(r2 N)	
	**	
	xtreg xeu_cx s_coll s_ind, fe
	est store M_FX6_1
	xtreg xeu_cx s_coll s_ind wbgi_pve, fe
	est store M_FX6_2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo, fe
	est store M_FX6_3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, fe
	est store M_FX6_4
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	est store M_FX6_5
	esttab M_FX6_1 M_FX6_2 M_FX6_3 M_FX6_4 M_FX6_5
	esttab M_FX6_1 M_FX6_2 M_FX6_3 M_FX6_4 M_FX6_5 using T_FX6, rtf cells(b(star fmt(3)) se(par fmt(2))) stats(r2 N)
	* //////////////////////////////////// *
	
	//////////////// ROBUSTNESS ON FIXED EFFECTS, not analysed in the thesis but in Appendices ////////////////////	
	xtreg meu_cm s_coll s_ind, fe robust
	est store MR_FM6_1
	xtreg meu_cm s_coll s_ind wbgi_pve, fe robust
	est store MR_FM6_2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo, fe robust
	est store MR_FM6_3
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, fe robust
	est store MR_FM6_4
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	est store MR_FM6_5
	esttab MR_FM6_1 MR_FM6_2 MR_FM6_3 MR_FM6_4 MR_FM6_5
	esttab MR_FM6_1 MR_FM6_2 MR_FM6_3 MR_FM6_4 MR_FM6_5 using MA_R_FM6, rtf cells(b(star fmt(6)) se(par fmt(2))) stats(r2 N)
	**
	xtreg xeu_cx s_coll s_ind, fe robust
	est store MR_FX6_1
	xtreg xeu_cx s_coll s_ind wbgi_pve, fe robust
	est store MR_FX6_2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo, fe robust
	est store MR_FX6_3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, fe robust
	est store MR_FX6_4
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	est store MR_FX6_5
	esttab MR_FX6_1 MR_FX6_2 MR_FX6_3 MR_FX6_4 MR_FX6_5
	esttab MR_FX6_1 MR_FX6_2 MR_FX6_3 MR_FX6_4 MR_FX6_5 using MA_R_FX6, rtf cells(b(star fmt(6)) se(par fmt(2))) stats(r2 N)
	/////////////////////////////////////////
	
	
	
	*** G2 - PROGRESSIVE FULL MODEL, RANDOM EFFECTS ***
	///// RANDOM EFFECTS without robust standard errors, not considered in the thesis /////
	xtreg meu_cm s_coll s_ind, re
	est store M_RM6_1
	xtreg meu_cm s_coll s_ind wbgi_pve, re
	est store M_RM6_2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo, re
	est store M_RM6_3
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, re
	est store M_RM6_4
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	est store M_RM6_5
	esttab M_RM6_1 M_RM6_2 M_RM6_3 M_RM6_4 M_RM6_5
	esttab M_RM6_1 M_RM6_2 M_RM6_3 M_RM6_4 M_RM6_5 using T_RM6, rtf cells(b(star fmt(3)) se(par fmt(2))) stats(r2 N)	
	**	
	xtreg xeu_cx s_coll s_ind, re
	est store M_RX6_1
	xtreg xeu_cx s_coll s_ind wbgi_pve, re
	est store M_RX6_2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo, re
	est store M_RX6_3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, re
	est store M_RX6_4
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	est store M_RX6_5
	esttab M_RX6_1 M_RX6_2 M_RX6_3 M_RX6_4 M_RX6_5
	esttab M_RX6_1 M_RX6_2 M_RX6_3 M_RX6_4 M_RX6_5 using T_RX6, rtf cells(b(star fmt(3)) se(par fmt(2))) stats(r2 N)
	* //////////////////////////////////// *
	
	//////////////// ROBUSTNESS ON RANDOM EFFECTS, ANALYSED IN THE THESIS, displaying 90% confidence interval ////////////////////	
	xtreg meu_cm s_coll s_ind, re robust
	est store MR_RM6_1
	xtreg meu_cm s_coll s_ind wbgi_pve, re robust
	est store MR_RM6_2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo, re robust
	est store MR_RM6_3
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, re robust
	est store MR_RM6_4
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	est store MR_RM6_5
	esttab MR_RM6_1 MR_RM6_2 MR_RM6_3 MR_RM6_4 MR_RM6_5
	esttab MR_RM6_1 MR_RM6_2 MR_RM6_3 MR_RM6_4 MR_RM6_5 using MA_R_RM6_p01, rtf cells(b(star fmt(6)) se(par fmt(2))) stats(r2 N) star(^ 0.1 * 0.05 ** 0.01 *** 0.001)
	**
	xtreg xeu_cx s_coll s_ind, re robust
	est store MR_RX6_1
	xtreg xeu_cx s_coll s_ind wbgi_pve, re robust
	est store MR_RX6_2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo, re robust
	est store MR_RX6_3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr, re robust
	est store MR_RX6_4
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	est store MR_RX6_5
	esttab MR_RX6_1 MR_RX6_2 MR_RX6_3 MR_RX6_4 MR_RX6_5
	esttab MR_RX6_1 MR_RX6_2 MR_RX6_3 MR_RX6_4 MR_RX6_5 using MA_R_RX6_p01, rtf cells(b(star fmt(6)) se(par fmt(2))) stats(r2 N) star(^ 0.1 * 0.05 ** 0.01 *** 0.001)	
	/////////////////////////////////////////

//////////////////////////
	
	
/////// H - POST-REG DIAGNOSTICS ///////

	*** H1 - Testing if panels are correlated; if < 0.05, the panels are correlated. *****
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xttest2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xttest2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xttest2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xttest2
	*
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	xttest2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	xttest2
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xttest2
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xttest2
	*******

	*** H2 - Testing for heteroscedasticity; if = 0, there is heteroscedasticity. Only works for fixed effects. *****
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xttest3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xttest3
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xttest3
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xttest3
	*
	* ONLY WORKS FOR FIXED EFFECTS *
	*****

	*** H3 - Pesaran ABS test. ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xtcsd, pesaran abs
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	xtcsd, pesaran abs
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xtcsd, pesaran abs
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	xtcsd, pesaran abs
	*
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	xtcsd, pesaran abs
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	xtcsd, pesaran abs
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xtcsd, pesaran abs
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	xtcsd, pesaran abs
		*-* All displayed an error. *-*
	********

	*** H4 - Serial PM test. ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war
	xtserialpm meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war
	xtserialpm xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war
		*-* All displayed an error. *-*
	*******

	*** H5 - Residuals QQ plots ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	predict ResM4_M
	qnorm ResM4_M, color("1 84 149")
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	predict ResM4_X
	qnorm ResM4_X, color("1 84 149")
	*
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	predict ResM4_MR
	qnorm ResM4_MR, color("1 84 149")
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	predict ResM4_XR
	qnorm ResM4_XR, color("1 84 149")
	**
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	predict ResRM4_M
	qnorm ResRM4_M, color("1 84 149")
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	predict ResRM4_X
	qnorm ResRM4_X, color("1 84 149")
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	predict ResRM4_MR
	qnorm ResRM4_MR, color("1 84 149")
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	predict ResRM4_XR
	qnorm ResRM4_XR, color("1 84 149")
	******
	
	*** H6 - Residuals scatters ***
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	predict FresA6_M1, xb
	predict ResA6_M1, u
	twoway (scatter FresA6_M1 ResA6_M1), ytitle(Residuals) xtitle(Fitted values)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\4 - POST-REGRESSION TESTS\Wave A6\FigA107_RVF_M_A6.png", as(png) name("Graph")
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe
	predict FresA6_X1, xb
	predict ResA6_X1, u
	twoway (scatter FresA6_X1 ResA6_X1), ytitle(Residuals) xtitle(Fitted values)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\4 - POST-REGRESSION TESTS\Wave A6\FigA108_RVF_X_A6.png", as(png) name("Graph")
	*
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	predict FresA6_MR1, xb
	predict ResA6_MR1, u
	twoway (scatter FresA6_MR1 ResA6_MR1), ytitle(Residuals) xtitle(Fitted values)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\4 - POST-REGRESSION TESTS\Wave A6\FigA109_RVF_XR_A6.png", as(png) name("Graph")
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, fe robust
	predict FresA6_XR1, xb
	predict ResA6_XR1, u
	twoway (scatter FresA6_XR1 ResA6_XR1), ytitle(Residuals) xtitle(Fitted values)
	graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\4 - POST-REGRESSION TESTS\Wave A6\FigA110_RVF_XR_A6.png", as(png) name("Graph")
	*******
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	predict RFresA6_M1, xb
	predict RResA6_M1, u
	twoway (scatter RFresA6_M1 RResA6_M1), ytitle(Residuals) xtitle(Fitted values)
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re
	predict RFresA6_X1, xb
	predict RResA6_X1, u
	twoway (scatter RFresA6_X1 RResA6_X1), ytitle(Residuals) xtitle(Fitted values)
	*
	xtreg meu_cm s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	predict RFresA6_MR1, xb
	predict RResA6_MR1, u
	twoway (scatter RFresA6_MR1 RResA6_MR1), ytitle(Residuals) xtitle(Fitted values)
	*
	xtreg xeu_cx s_coll s_ind wbgi_pve bc_wdi_unempilo ln_wdi_gdpgr c_war, re robust
	predict RFresA6_XR1, xb
	predict RResA6_XR1, u
	twoway (scatter RFresA6_XR1 RResA6_XR1), ytitle(Residuals) xtitle(Fitted values)
	////////////////////

////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////










* VISUALIZATION GRAPHS *

use "C:\Données\MASTER\THESIS\UPLOADED DATA\DATASET\LucasGVogler-ThesisMAES-VisualizationDataset.dta"

// Collective sanctions x Imports
tw (line meu_cm_by meu_cm_mm meu_cm_cn meu_cm_kp meu_cm_gn meu_cm_ir meu_cm_ly meu_cm_ru meu_cm_zw meu_cm_sy meu_cm_us meu_cm_ve y_a_s_coll) (line meu_cm_ci y_a_s_coll if y_a_s_coll<7) (line meu_cm_ci y_a_s_coll if y_a_s_coll>5, lp(dash) lc(gs12)) (line meu_cm_ss y_a_s_coll if y_a_s_coll<8)  (line meu_cm_ss y_a_s_coll if y_a_s_coll>=7, lp(dash) lc(gs12))
graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\0 - GET TO KNOW DATA\Fig1.png", as(png) name("Graph")

// Individual sanctions x Imports
tw (line i_meu_cm_by i_meu_cm_bi i_meu_cm_ci i_meu_cm_kp i_meu_cm_cd i_meu_cm_eg i_meu_cm_gn i_meu_cm_gw i_meu_cm_ir i_meu_cm_ly i_meu_cm_rs i_meu_cm_ru i_meu_cm_zw i_meu_cm_sy i_meu_cm_tn i_meu_cm_ua i_meu_cm_ve y_a_s_coll) (line i_meu_cm_mm y_a_s_coll if y_a_s_coll<=1) (line i_meu_cm_mm y_a_s_coll if y_a_s_coll>=1, lp(dash) lc(gs12)) (line i_meu_cm_mm y_a_s_coll if y_a_s_coll>6) (line i_meu_cm_ss y_a_s_coll if y_a_s_coll<=7) (line i_meu_cm_ss y_a_s_coll if y_a_s_coll>=7, lp(dash) lc(gs12))
graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\0 - GET TO KNOW DATA\Fig2.png", as(png) name("Graph")


// Collective sanctions x Exports
tw (line c_xeu_cx_by c_xeu_cx_mm c_xeu_cx_cn c_xeu_cx_kp c_xeu_cx_gn c_xeu_cx_ir c_xeu_cx_ly c_xeu_cx_ru c_xeu_cx_zw c_xeu_cx_sy c_xeu_cx_us c_xeu_cx_ve y_a_s_coll) (line c_xeu_cx_ci y_a_s_coll if y_a_s_coll<7) (line c_xeu_cx_ci y_a_s_coll if y_a_s_coll>5, lp(dash) lc(gs12)) (line c_xeu_cx_ss y_a_s_coll if y_a_s_coll<8)  (line c_xeu_cx_ss y_a_s_coll if y_a_s_coll>=7, lp(dash) lc(gs12))
graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\0 - GET TO KNOW DATA\Fig3.png", as(png) name("Graph")

// Individual sanctions x Exports
tw (line i_xeu_cx_by i_xeu_cx_bi i_xeu_cx_ci i_xeu_cx_kp i_xeu_cx_cd i_xeu_cx_eg i_xeu_cx_gn i_xeu_cx_gw i_xeu_cx_ir i_xeu_cx_ly i_xeu_cx_rs i_xeu_cx_ru i_xeu_cx_zw i_xeu_cx_sy i_xeu_cx_tn i_xeu_cx_ua i_xeu_cx_ve y_a_s_coll) (line i_xeu_cx_mm y_a_s_coll if y_a_s_coll<=1) (line i_xeu_cx_mm y_a_s_coll if y_a_s_coll>=1, lp(dash) lc(gs12)) (line i_xeu_cx_mm y_a_s_coll if y_a_s_coll>6) (line i_xeu_cx_ss y_a_s_coll if y_a_s_coll<=7) (line i_xeu_cx_ss y_a_s_coll if y_a_s_coll>=7, lp(dash) lc(gs12))
graph export "C:\Données\MASTER\THESIS\DATA\AS APPENDICES\0 - GET TO KNOW DATA\Fig4.png", as(png) name("Graph")

////////////////////////////////////////////////////////////////////////////////////////////